#ifndef TRANSFER_PROGRESS_DIALOG_HPP
#define TRANSFER_PROGRESS_DIALOG_HPP

#include <QDialog>
#include <QProgressBar>
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>

class TransferProgressDialog : public QDialog
{
    Q_OBJECT

public:
    explicit TransferProgressDialog(const QString &title, const QString &fileNameToDisplay, QWidget *parent = nullptr);
    ~TransferProgressDialog();

    // 更新进度信息 - Simplified
    void updateProgress(int percentage, const QString &statusMessage);

    // 设置传输状态 (This might be redundant if updateProgress takes statusMessage)
    // void setTransferState(int state); // Consider removing or simplifying

    // 传输完成
    void markCompleted(const QString &message);

    // 传输错误
    void markError(const QString &errorMessage);

signals:
    void cancelRequested();

private slots:
    void onCancelClicked();

private:
    // UI元素
    QProgressBar *m_progressBar;
    QLabel *m_fileNameLabel;
    QLabel *m_statusLabel;
    QPushButton *m_cancelButton;

    // 数据
    // QString m_filePath; // Still useful for display
    // quint64 m_lastTransferred; // Removed
    // QTimer m_rateTimer;       // Removed
    // QElapsedTimer m_elapsed;  // Removed

    // QString formatSize(quint64 size); // Removed, as we don't have size info for rate
};

#endif // TRANSFER_PROGRESS_DIALOG_HPP